package Vista;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaGestionarArbitro extends javax.swing.JFrame {
	
	
	private JTextField txtdatosarbitro;
	private JLabel lblcedula;
	private JLabel lblapellido;
	private JButton btnregistrar;
	private JButton btnsalir;
	private JButton btncancelar;
	private JTextField txtfechanacimiento;
	private JLabel lblfechanacimiento;
	private JTextField txtapellido;
	private JTextField txtnombre;
	private JLabel lblnombre;
	private JTextField txtcedula;

	public VentanaGestionarArbitro() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			this.setTitle("Gestionar Arbitro");
			getContentPane().setLayout(null);
			{
				txtdatosarbitro = new JTextField();
				this.setEnabled(false);
				getContentPane().add(txtdatosarbitro);
				txtdatosarbitro.setText("Datos Arbitro");
				txtdatosarbitro.setBounds(29, 18, 420, 21);
				txtdatosarbitro.setFont(new java.awt.Font("DejaVu Sans",1,14));
			}
			{
				lblcedula = new JLabel();
				getContentPane().add(lblcedula);
				lblcedula.setText("Cedula:");
				lblcedula.setBounds(29, 84, 62, 14);
				lblcedula.setFont(new java.awt.Font("DejaVu Sans",0,14));
			}
			{
				txtcedula = new JTextField();
				this.setEnabled(true);
				getContentPane().add(txtcedula);
				txtcedula.setBounds(120, 81, 121, 21);
			}
			{
				lblnombre = new JLabel();
				getContentPane().add(lblnombre);
				lblnombre.setText("Nombre:");
				lblnombre.setBounds(29, 131, 60, 14);
				lblnombre.setFont(new java.awt.Font("DejaVu Sans",0,14));
			}
			{
				txtnombre = new JTextField();
				getContentPane().add(txtnombre);
				txtnombre.setBounds(120, 128, 120, 21);
			}
			{
				lblapellido = new JLabel();
				getContentPane().add(lblapellido);
				lblapellido.setText("Apellido:");
				lblapellido.setBounds(29, 181, 60, 14);
				lblapellido.setFont(new java.awt.Font("DejaVu Sans",0,14));
			}
			{
				txtapellido = new JTextField();
				getContentPane().add(txtapellido);
				txtapellido.setBounds(120, 174, 120, 21);
			}
			{
				lblfechanacimiento = new JLabel();
				getContentPane().add(lblfechanacimiento);
				lblfechanacimiento.setText("Fecha de Nacimiento:");
				lblfechanacimiento.setBounds(29, 233, 152, 14);
				lblfechanacimiento.setFont(new java.awt.Font("DejaVu Sans",0,14));
			}
			{
				txtfechanacimiento = new JTextField();
				getContentPane().add(txtfechanacimiento);
				txtfechanacimiento.setBounds(193, 230, 112, 21);
			}
			{
				btnregistrar = new JButton();
				getContentPane().add(btnregistrar);
				btnregistrar.setText("Registrar");
				btnregistrar.setBounds(53, 297, 100, 30);
				btnregistrar.setFont(new java.awt.Font("DejaVu Sans",0,14));
				btnregistrar.setBackground(new java.awt.Color(77,212,224));
			}
			{
				btncancelar = new JButton();
				getContentPane().add(btncancelar);
				btncancelar.setText("Cancelar");
				btncancelar.setBounds(220, 296, 102, 31);
				btncancelar.setFont(new java.awt.Font("DejaVu Sans",0,14));
				btncancelar.setBackground(new java.awt.Color(77,212,224));
			}
			{
				btnsalir = new JButton();
				getContentPane().add(btnsalir);
				btnsalir.setText("Salir");
				btnsalir.setBounds(391, 296, 87, 31);
				btnsalir.setFont(new java.awt.Font("DejaVu Sans",0,14));
				btnsalir.setBackground(new java.awt.Color(77,212,224));
			}
			pack();
			this.setSize(532, 425);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public String getCedula(){
		return txtcedula.getText();
	}
	
	public String getNombre(){
		return txtnombre.getText();
	}
	
	public String getApelldio(){
		return txtapellido.getText();
	}
	
	public String getFechaNacimiento(){
		return txtfechanacimiento.getText();
	}

	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}
	
	
	public void agregarListener(ActionListener accion){
		
	   btnregistrar.addActionListener(accion);
	   btncancelar.addActionListener(accion);
	   btnsalir.addActionListener(accion);
	}
	
	public void blanquearCampos(){
		txtcedula.setText("");
		txtnombre.setText("");
		txtapellido.setText("");
		txtfechanacimiento.setText("");
	
	}
}
